<?php /* Smarty version 2.6.13, created on 2008-11-25 15:55:43
         compiled from rubric.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'truncate', 'rubric.tpl', 9, false),)), $this); ?>
<ul style="list-style: none;">
<?php $_from = $this->_tpl_vars['ImportedObjects']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['number'] => $this->_tpl_vars['ImportedObject']):
?>
    <li style="margin: 5px 0px 5px 10px;">
        <div style="float: right;">
            [<a href="javascript: void(0);" onclick="window.saveObject(<?php echo $this->_tpl_vars['ImportedObject']['id']; ?>
);">сохранить</a>]
            [<a href="javascript: void(0);" onclick="if (confirm('Вы действительно хотите удалить эту запись?')) window.deleteObject(<?php echo $this->_tpl_vars['ImportedObject']['id']; ?>
);">удалить</a>]
        </div>
        <span style="font-size: 14px; font-weight: bold;"><?php echo $this->_tpl_vars['ImportedObject']['object']['name']; ?>
</span><br>
        <?php echo ((is_array($_tmp=$this->_tpl_vars['ImportedObject']['object']['info'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 255, "...") : smarty_modifier_truncate($_tmp, 255, "...")); ?>

    </li>
<?php endforeach; endif; unset($_from); ?>
</ul>

<?php echo '
<script>
    Object.extend(window, {
	    saveObject: function(objId) {
	        window.blockScreen();
	    
	        new Ajax.Request('; ?>
'<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
import/saveobject'<?php echo ',{
	            parameters: {objId: objId},
	            onComplete: function (transport) {
	                window.tabs.reload();
	                window.completeRequest(transport);
	            },
	            onError: function () {
	                if ($(\'contentblocker\')) $(\'contentblocker\').hide();
	            }
	        });
	    },
	    
	    deleteObject: function(objId) {
	        window.blockScreen();
	    
	        new Ajax.Request('; ?>
'<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
import/deleteobject'<?php echo ',{
	            parameters: {objId: objId},
	            onComplete: function (transport) {
	                window.tabs.reload();
	                window.completeRequest(transport);
	            },
	            onError: function () {
	                if ($(\'contentblocker\')) $(\'contentblocker\').hide();
	            }
	        });
	    }
    });    

</script>
'; ?>
